-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.x] Add success and failure command assertions #39435
Conversation
011e9cf
to
504bca5
Compare
What about just |
Sounds great, I just renamed the methods. Thanks for the feedback, @taylorotwell! |
* | ||
* @return $this | ||
*/ | ||
public function assertFailed() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if this should assert exit code not equal to zero. Commands can fail with exit codes other than 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're totally right, @GrahamCampbell, I updated the implementation based on this 👍
67a89f5
to
c126578
Compare
c126578
to
dd4356c
Compare
The test failures seem unrelated to this PR, but please let me know if I can do anything for them 😃 |
After browsing some of my tests for the console commands, I found that I have been doing either:
or
With this new set of assertions, this can be unified and by having the IDE to provide auto-completion, writing tests feels smoother: